<ion-view hide-back-button="true" title="商品详情" id="saledetail-view">
  <ion-nav-buttons side="left">
    <button class="button button-clear" ng-click="goBack()">
      <i class="icon ion-chevron-left"></i>
    </button>
  </ion-nav-buttons>
  <ion-content>
    <div>

      <ion-slide-box style="width: 100%">
        <ion-slide ng-show="goods.imgurl1" style="width: 100%">
          <img alt="" ng-src="{{goods.imgurl1}}" width="100%"/>
        </ion-slide>
        <ion-slide ng-show="goods.imgurl2" style="width: 100%">
          <img alt="" ng-src="{{goods.imgurl2}}" width="100%"/>
        </ion-slide>
        <ion-slide ng-show="goods.imgurl3" style="width: 100%">
          <img alt="" ng-src="{{goods.imgurl3}}" width="100%"/>
        </ion-slide>
      </ion-slide-box>

      <ul class="list" style="font-size: 18px;">
        <li class="item">
          <div class="goods-name">{{goods.name}}
            <img alt="" src="img/hd/tab_cx.png" style="height: 19px">
          </div>
          <div class="main-color" style="font-size: 20px; margin-top: 10px">{{goods.cx_price}}
            <span style="font-size: 15px">元
              <del style="color: #aaa; font-size: 13px">市场价：{{goods.sc_price}}元</del>
            </span>
          </div>
        </li>
        <li class="item item-divider">
          <span ng-show="goods.sendtype == 3"><img alt="" src="img/hd/icon_choose.png" style="width: 15px"> 次日达</span>
          <span ng-show="goods.sendtype == 0"><img alt="" src="img/hd/icon_choose.png" style="width: 15px"> 39分钟送达</span>
          <span ng-show="goods.sendtype == 1"><img alt="" src="img/hd/icon_choose.png" style="width: 15px"> 49分钟送达</span>
          <span ng-show="goods.sendtype == 2"><img alt="" src="img/hd/icon_choose.png" style="width: 15px"> 59分钟送达</span>
          <span ng-show="goods.tag">
            <img alt="" src="img/hd/icon_choose.png" style="width: 15px">
            满9元包邮
          </span>
        </li>
        <li class="item item-icon-right" style="height: 70px; font-size: 18px;padding-top: 25px;">
          <span style="color: #aaa">送至</span>
          <span style="color: #5d5d5d; padding-left: 10px; font-weight: 700">{{dist.name}}</span>
          <i class="icon ion-chevron-right" style="color: #eee; font-size: 20px;"></i>
        </li>
        <li class="item item-icon-right" ng-show="goods.sendtype && goods.sendtype != 4" style="height: 70px; font-size: 18px;padding-top: 25px;">
          <span style="color: #aaa">闪电配送</span>
          <span ng-show="goods.sendtype == 3"><img alt="" src="img/hd/ico_cr.png" style="padding-left: 10px;height: 15px"></span>
          <span ng-show="goods.sendtype == 0"><img alt="" src="img/hd/ico_39.png" style="padding-left: 10px;height: 15px"></span>
          <span ng-show="goods.sendtype == 1"><img alt="" src="img/hd/ico_49.png" style="padding-left: 10px;height: 15px"></span>
          <span ng-show="goods.sendtype == 2"><img alt="" src="img/hd/ico_59.png" style="padding-left: 10px;height: 15px"></span>
        </li>
        <li class="item" style="height: 100px; font-size: 18px;padding-top: 25px;">
          <span style="color: #aaa">商品评价</span>
          <span style="color: #5d5d5d; padding-left: 10px; font-weight: 700">共{{commentcount}}条</span>
          <div ng-init="max=5" style="">
            <span style="float: left; line-height: 30px">总体评分</span>
            <span style="float: right; line-height: 30px">
              <rating max="max" ng-model="rate" readonly="true"></rating>
            </span>
          </div>
        </li>
      </ul>
      <div class="goods-detail" ng-bind-html="goods.product_detail"></div>

      <div style="height: 50px" id="goodssale-last"></div>
    </div>
  </ion-content>
  <div style="background-color: #fff; position: fixed; bottom: 0px;width: 100%">
    <button class="item piece-btn" ng-click="addCart()" ng-show="goods.status == 0 && goods.default_amount > 0" style="width: 100%">
      加入购物车
    </button>
    <button class="item piece-btn" ng-show="goods.status != 0" style="width: 100%; background-color: #999">
      已下架
    </button>
    <button class="item piece-btn" ng-show="goods.status == 0 && goods.remain_amount <= 0" style="width: 100%; background-color: #999">
      已售完
    </button>
  </div>
</ion-view>
